home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: July, 1998
- // Author: Carol Levy
- //
- // Description:
- // This script contains code to create and/or set the default
- // values for the option vars for the Dynamics Clip Effects
- // menus/option boxes.
- //
- //
- // ================ dynSetClipEffectsOptionVars ================
- //
- // SYNOPSIS
- // Set the specified sprite clip effect option box controls.
- //
- // INPUT ARGUMENTS
- // string $theClipEffect the name of the clip effect to set controls for
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc dynSetClipEffectsOptionVars(string $theClipEffect, int $setFactorySettings)
- {
- if (!isValidClipEffect($theClipEffect))
- return;
-
- string $procName = ("set"+$theClipEffect+"OptionVars");
- eval ($procName+" "+$setFactorySettings);
- }
-
-
- // ================ setSmokeOptionVars ================
- //
- // SYNOPSIS
- // Set the smoke sprite clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setSmokeOptionVars (int $setFactorySettings)
- {
-
- // Option vars for the image attributes.
- //
- if( $setFactorySettings || !`optionVar -exists smokeImageName` )
- {
- optionVar -stringValue smokeImageName "";
- }
- if( $setFactorySettings || !`optionVar -exists smokeCycleImages` )
- {
- optionVar -intValue smokeCycleImages 0 ;
- }
- if( $setFactorySettings || !`optionVar -exists smokeStartImage` )
- {
- optionVar -intValue smokeStartImage 0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeEndImage` )
- {
- optionVar -intValue smokeEndImage 50;
- }
-
- // Option vars for the smoke attributes.
- //
- if( $setFactorySettings || !`optionVar -exists smokeParticleName` )
- {
- optionVar -stringValue smokeParticleName "";
- }
- if( $setFactorySettings || !`optionVar -exists smokeMinLifespan` )
- {
- optionVar -floatValue smokeMinLifespan 3.0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeMaxLifespan` )
- {
- optionVar -floatValue smokeMaxLifespan 7.0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeThreshold` )
- {
- optionVar -floatValue smokeThreshold 0.25;
- }
- if( $setFactorySettings || !`optionVar -exists smokeOpacity` )
- {
- optionVar -floatValue smokeOpacity .4;
- }
-
- // Option vars for the smoke emission attributes.
- //
- if( $setFactorySettings || !`optionVar -exists smokeEmitterName` )
- {
- optionVar -stringValue smokeEmitterName "";
- }
- if( $setFactorySettings || !`optionVar -exists smokeEmissionRate` )
- {
- optionVar -floatValue smokeEmissionRate 112.4;
- }
- if( $setFactorySettings || !`optionVar -exists smokeEmissionSpread` )
- {
- optionVar -floatValue smokeEmissionSpread .11;
- }
- if( $setFactorySettings || !`optionVar -exists smokeEmissionSpeed` )
- {
- optionVar -floatValue smokeEmissionSpeed 1.0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeEmissionDirX` )
- {
- optionVar -floatValue smokeEmissionDirX 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeEmissionDirY` )
- {
- optionVar -floatValue smokeEmissionDirY 1.0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeEmissionDirZ` )
- {
- optionVar -floatValue smokeEmissionDirZ 0.0;
- }
-
- // Option vars for the turbulence attributes.
- //
- if( $setFactorySettings || !`optionVar -exists smokeUseTurbulence` )
- {
- optionVar -intValue smokeUseTurbulence 1 ;
- }
-
- if( $setFactorySettings || !`optionVar -exists smokeTurbulenceName` )
- {
- optionVar -stringValue smokeTurbulenceName "";
- }
- if( $setFactorySettings || !`optionVar -exists smokeTurbulenceMagnitude` )
- {
- optionVar -floatValue smokeTurbulenceMagnitude 0.2;
- }
- if( $setFactorySettings || !`optionVar -exists smokeTurbulenceFrequency` )
- {
- optionVar -floatValue smokeTurbulenceFrequency 2.0;
- }
- if( $setFactorySettings || !`optionVar -exists smokeTurbulenceAttenuation` )
- {
- optionVar -floatValue smokeTurbulenceAttenuation 2.8;
- }
-
- }
-
-
- // ================ setFireOptionVars ================
- //
- // SYNOPSIS
- // Set the fire clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setFireOptionVars (int $setFactorySettings)
- {
- // Option vars for the fire object and particle names.
- //
- if( $setFactorySettings || !`optionVar -exists fireObject` )
- {
- optionVar -stringValue fireObject "";
- }
- if( $setFactorySettings || !`optionVar -exists fireParticleName` )
- {
- optionVar -stringValue fireParticleName "";
- }
-
- // Option var for the emitter type.
- //
- if( $setFactorySettings || !`optionVar -exists fireEmissionTypeOV`)
- {
- optionVar -intValue fireEmissionTypeOV 3;
- }
-
- // Option vars for the fire attributes.
- //
- if( $setFactorySettings || !`optionVar -exists fireDensity` )
- {
- optionVar -floatValue fireDensity 10;
- }
- if( $setFactorySettings || !`optionVar -exists fireStartRadius` )
- {
- optionVar -floatValue fireStartRadius 1.0;
- }
- if( $setFactorySettings || !`optionVar -exists fireEndRadius` )
- {
- optionVar -floatValue fireEndRadius 0.4;
- }
- if( $setFactorySettings || !`optionVar -exists fireIntensity` )
- {
- optionVar -floatValue fireIntensity .35;
- }
- if( $setFactorySettings || !`optionVar -exists fireSpread` )
- {
- optionVar -floatValue fireSpread .15;
- }
- if( $setFactorySettings || !`optionVar -exists fireScale` )
- {
- optionVar -floatValue fireScale 1;
- }
- if( $setFactorySettings || !`optionVar -exists fireTurbulence` )
- {
- optionVar -floatValue fireTurbulence 240;
- }
- if( $setFactorySettings || !`optionVar -exists fireSpeed` )
- {
- optionVar -floatValue fireSpeed 85;
- }
-
- // Option vars for the fire direction.
- //
- if( $setFactorySettings || !`optionVar -exists fireDirectionX` )
- {
- optionVar -floatValue fireDirectionX 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists fireDirectionY` )
- {
- optionVar -floatValue fireDirectionY 1.0;
- }
- if( $setFactorySettings || !`optionVar -exists fireDirectionZ` )
- {
- optionVar -floatValue fireDirectionZ 0.0;
- }
- }
-
-
- // ================ setFireworksOptionVars ================
- //
- // SYNOPSIS
- // Set the fireworks clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setFireworksOptionVars (int $setFactorySettings)
- {
- // Option var for the fireworks name.
- //
- if( $setFactorySettings || !`optionVar -exists fireworksName` )
- {
- optionVar -stringValue fireworksName "";
- }
-
- if( $setFactorySettings || !`optionVar -exists fwNumRockets` )
- {
- optionVar -intValue fwNumRockets 10;
- }
-
- if( $setFactorySettings || !`optionVar -exists fwLaunchPositionX` )
- {
- optionVar -floatValue fwLaunchPositionX 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwLaunchPositionY` )
- {
- optionVar -floatValue fwLaunchPositionY 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwLaunchPositionZ` )
- {
- optionVar -floatValue fwLaunchPositionZ 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterX` )
- {
- optionVar -floatValue fwBurstPosCenterX 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterY` )
- {
- optionVar -floatValue fwBurstPosCenterY 25;
- }
- if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterZ` )
- {
- optionVar -floatValue fwBurstPosCenterZ 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwBurstExtentsX` )
- {
- optionVar -floatValue fwBurstExtentsX 10;
- }
- if( $setFactorySettings || !`optionVar -exists fwBurstExtentsY` )
- {
- optionVar -floatValue fwBurstExtentsY 10;
- }
- if( $setFactorySettings || !`optionVar -exists fwBurstExtentsZ` )
- {
- optionVar -floatValue fwBurstExtentsZ 10;
- }
-
- if( $setFactorySettings || !`optionVar -exists fwFirstLaunchFrame` )
- {
- optionVar -floatValue fwFirstLaunchFrame 1;
- }
- if( $setFactorySettings || !`optionVar -exists fwLaunchRate` )
- {
- optionVar -floatValue fwLaunchRate .1;
- }
- if( $setFactorySettings || !`optionVar -exists fwMinFlightTime` )
- {
- optionVar -floatValue fwMinFlightTime 30;
- }
- if( $setFactorySettings || !`optionVar -exists fwMaxFlightTime` )
- {
- optionVar -floatValue fwMaxFlightTime 60;
- }
-
- if( $setFactorySettings || !`optionVar -exists fwMaxBurstSpeed` )
- {
- optionVar -floatValue fwMaxBurstSpeed 20;
- }
-
-
- if( $setFactorySettings || !`optionVar -exists fwTrailRate` )
- {
- optionVar -floatValue fwTrailRate 50;
- }
- if( $setFactorySettings || !`optionVar -exists fwTrailSpeed` )
- {
- optionVar -floatValue fwTrailSpeed 0.5;
- }
- if( $setFactorySettings || !`optionVar -exists fwTrailSpread` )
- {
- optionVar -floatValue fwTrailSpread 0.5;
- }
- if( $setFactorySettings || !`optionVar -exists fwMinTrailTailSize` )
- {
- optionVar -floatValue fwMinTrailTailSize .2;
- }
- if( $setFactorySettings || !`optionVar -exists fwMaxTrailTailSize` )
- {
- optionVar -floatValue fwMaxTrailTailSize .8;
- }
-
-
- if( $setFactorySettings || !`optionVar -exists fwTrailSetUserColor` )
- {
- optionVar -intValue fwTrailSetUserColor 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwTrailColorCreationProc` )
- {
- optionVar -stringValue fwTrailColorCreationProc "";
- }
- if( $setFactorySettings || !`optionVar -exists fwTrailNumColors` )
- {
- optionVar -intValue fwTrailNumColors 5;
- }
- if( $setFactorySettings || !`optionVar -exists fwTrailGlowIntensity` )
- {
- optionVar -floatValue fwTrailGlowIntensity .3;
- }
- if( $setFactorySettings || !`optionVar -exists fwTrailIncanIntensity` )
- {
- optionVar -floatValue fwTrailIncanIntensity .25;
- }
-
- if( $setFactorySettings || !`optionVar -exists fwMinSparksCount` )
- {
- optionVar -floatValue fwMinSparksCount 100;
- }
- if( $setFactorySettings || !`optionVar -exists fwMaxSparksCount` )
- {
- optionVar -floatValue fwMaxSparksCount 200;
- }
- if( $setFactorySettings || !`optionVar -exists fwMinSparksTailSize` )
- {
- optionVar -floatValue fwMinSparksTailSize .3;
- }
- if( $setFactorySettings || !`optionVar -exists fwMaxSparksTailSize` )
- {
- optionVar -floatValue fwMaxSparksTailSize 1;
- }
-
- if( $setFactorySettings || !`optionVar -exists fwSparksSetUserColor` )
- {
- optionVar -intValue fwSparksSetUserColor 0;
- }
- if( $setFactorySettings || !`optionVar -exists fwSparksColorCreationProc` )
- {
- optionVar -stringValue fwSparksColorCreationProc "";
- }
- if( $setFactorySettings || !`optionVar -exists fwSparksNumColors` )
- {
- optionVar -intValue fwSparksNumColors 32;
- }
- if( $setFactorySettings || !`optionVar -exists fwSparksColorSpread` )
- {
- optionVar -intValue fwSparksColorSpread 1;
- }
- if( $setFactorySettings || !`optionVar -exists fwSparksGlowIntensity` )
- {
- optionVar -floatValue fwSparksGlowIntensity .3;
- }
- if( $setFactorySettings || !`optionVar -exists fwSparksIncanIntensity` )
- {
- optionVar -floatValue fwSparksIncanIntensity .25;
- }
-
- }
-
-
- // ================ setFlowOptionVars ================
- //
- // SYNOPSIS
- // Set the flow-along-curve clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setFlowOptionVars (int $setFactorySettings)
- {
- // Option var for the melt object.
- //
- if( $setFactorySettings || !`optionVar -exists flowObject` )
- {
- optionVar -stringValue flowObject "";
- }
-
- // Option vars for the flow creation controls.
- //
- if( $setFactorySettings || !`optionVar -exists flowAttachEmitter` )
- {
- optionVar -intValue flowAttachEmitter 1 ;
- }
- if( $setFactorySettings || !`optionVar -exists flowNumControlSegs` )
- {
- optionVar -floatValue flowNumControlSegs 5;
- }
- if( $setFactorySettings || !`optionVar -exists flowNumControlSubsegs` )
- {
- optionVar -floatValue flowNumControlSubsegs 4;
- }
-
- // Option vars for the flow attributes.
- //
- if( $setFactorySettings || !`optionVar -exists flowEmitterRate` )
- {
- optionVar -floatValue flowEmitterRate 50;
- }
- if( $setFactorySettings || !`optionVar -exists flowRandomMotion` )
- {
- optionVar -floatValue flowRandomMotion .5;
- }
- if( $setFactorySettings || !`optionVar -exists flowLifespan` )
- {
- optionVar -floatValue flowLifespan 5;
- }
- if( $setFactorySettings || !`optionVar -exists flowGoalWeight` )
- {
- optionVar -floatValue flowGoalWeight 1;
- }
- }
-
-
- // ================ setSurfaceFlowOptionVars ================
- //
- // SYNOPSIS
- // Set the flow-along-surface clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setSurfaceFlowOptionVars(int $setFactorySettings)
- {
- // Option var for the surface flow object.
- //
- if( $setFactorySettings || !`optionVar -exists surfaceFlowObject` )
- {
- optionVar -stringValue surfaceFlowObject "";
- }
-
- // Option vars for the flow creation controls.
- //
- if( $setFactorySettings || !`optionVar -exists surfaceFlowCreateParticle` )
- {
- optionVar -intValue surfaceFlowCreateParticle 1 ;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowCreateParticleForEachFlow` )
- {
- optionVar -intValue surfaceFlowCreateParticleForEachFlow 0 ;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowManipType` )
- {
- optionVar -stringValue surfaceFlowManipType "u";
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowControlResolution` )
- {
- optionVar -floatValue surfaceFlowControlResolution 5;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowSubControlResolution` )
- {
- optionVar -floatValue surfaceFlowSubControlResolution 0;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowManipulatorResolution` )
- {
- optionVar -floatValue surfaceFlowManipulatorResolution 2;
- }
-
- // Option vars for the flow attributes.
- //
- if( $setFactorySettings || !`optionVar -exists surfaceFlowGoalWeight` )
- {
- optionVar -floatValue surfaceFlowGoalWeight 1;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowEmitterRate` )
- {
- optionVar -floatValue surfaceFlowEmitterRate 10;
- }
- if($setFactorySettings || !`optionVar -exists surfaceFlowParticleLifespan`)
- {
- optionVar -floatValue surfaceFlowParticleLifespan 1.0;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowMinAgeRatio` )
- {
- optionVar -floatValue surfaceFlowMinAgeRatio 0;
- }
- if( $setFactorySettings || !`optionVar -exists surfaceFlowMaxAgeRatio` )
- {
- optionVar -floatValue surfaceFlowMaxAgeRatio 1;
- }
- }
-
-
- // ================ setDeleteSurfaceFlowOptionVars ================
- //
- // SYNOPSIS
- // Set the delete-surface-flow clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setDeleteSurfaceFlowOptionVars(int $setFactorySettings)
- {
- if( $setFactorySettings || !`optionVar -exists deleteSurfaceFlow` )
- {
- optionVar -intValue deleteSurfaceFlow 1 ;
- }
- if( $setFactorySettings || !`optionVar -exists removeParticlesFromSurfaceFlow` )
- {
- optionVar -intValue removeParticlesFromSurfaceFlow 0 ;
- }
- if( $setFactorySettings || !`optionVar -exists deleteSurfaceFlowParticles`)
- {
- optionVar -intValue deleteSurfaceFlowParticles 0 ;
- }
-
- int $checkBoxExist = `checkBoxGrp -exists deleteSurfaceFlowParticles`;
- if( $checkBoxExist )
- {
- int $removeParticles = 0;
- int $radioExist = `optionVar -exists removeParticlesFromSurfaceFlow`;
- if( $radioExist )
- $removeParticles = `optionVar -q removeParticlesFromSurfaceFlow`;
- if( $removeParticles )
- checkBoxGrp -e -enable 0 deleteSurfaceFlowParticles;
- else
- checkBoxGrp -e -enable 1 deleteSurfaceFlowParticles;
- }
- }
-
-
- // ================ setLightningOptionVars ================
- //
- // SYNOPSIS
- // Set the lightning clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setLightningOptionVars(int $setFactorySettings)
- {
- // Option var for the surface flow object.
- //
- if( $setFactorySettings || !`optionVar -exists lightningObject` )
- {
- optionVar -stringValue lightningObject "";
- }
-
- // Option vars for the flow creation controls.
- //
- if( $setFactorySettings || !`optionVar -exists lightningGrouping` )
- {
- optionVar -intValue lightningGrouping 0 ;
- }
- if( $setFactorySettings || !`optionVar -exists lightningCreateOptions` )
- {
- optionVar -intValue lightningCreateOptions 1 ;
- }
- if( $setFactorySettings || !`optionVar -exists lightningCurveSegments` )
- {
- optionVar -intValue lightningCurveSegments 20;
- }
- if( $setFactorySettings || !`optionVar -exists lightningThickness` )
- {
- optionVar -floatValue lightningThickness 1;
- }
- if( $setFactorySettings || !`optionVar -exists lightningMaxSpread` )
- {
- optionVar -floatValue lightningMaxSpread 1;
- }
- if( $setFactorySettings || !`optionVar -exists lightningStart` )
- {
- optionVar -floatValue lightningStart 0;
- }
- if( $setFactorySettings || !`optionVar -exists lightningEnd` )
- {
- optionVar -floatValue lightningEnd 1;
- }
- if( $setFactorySettings || !`optionVar -exists lightningGlowIntensity` )
- {
- optionVar -floatValue lightningGlowIntensity 0.5;
- }
- }
-
-
- // ================ setMeltOptionVars ================
- //
- // SYNOPSIS
- // Set the melt clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- //
- global proc setMeltOptionVars (int $setFactorySettings)
- {
- // Option vars for the melt object and melt-on object names.
- //
- if( $setFactorySettings || !`optionVar -exists meltObject` )
- {
- optionVar -stringValue meltObject "";
- }
- if( $setFactorySettings || !`optionVar -exists meltOnObject` )
- {
- optionVar -stringValue meltOnObject "";
- }
-
- // Option vars for the melt attributes.
- //
- if( $setFactorySettings || !`optionVar -exists meltSpeed` )
- {
- optionVar -floatValue meltSpeed .4;
- }
- if( $setFactorySettings || !`optionVar -exists meltSpread` )
- {
- optionVar -floatValue meltSpread 1.0;
- }
- if( $setFactorySettings || !`optionVar -exists meltDistortion` )
- {
- optionVar -floatValue meltDistortion 1.5;
- }
-
- // Option vars for the melt direction.
- //
- if( $setFactorySettings || !`optionVar -exists meltDirectionX` )
- {
- optionVar -floatValue meltDirectionX 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists meltDirectionY` )
- {
- optionVar -floatValue meltDirectionY -1.0;
- }
- if( $setFactorySettings || !`optionVar -exists meltDirectionZ` )
- {
- optionVar -floatValue meltDirectionZ 0.0;
- }
-
- // Option vars for the melt control resolution.
- //
- if( $setFactorySettings || !`optionVar -exists meltUseLatticeRes` )
- {
- optionVar -intValue meltUseLatticeRes 0 ;
- }
- if( $setFactorySettings || !`optionVar -exists meltLatticeResX` )
- {
- optionVar -intValue meltLatticeResX 0;
- }
- if( $setFactorySettings || !`optionVar -exists meltLatticeResY` )
- {
- optionVar -intValue meltLatticeResY 0;
- }
- if( $setFactorySettings || !`optionVar -exists meltLatticeResZ` )
- {
- optionVar -intValue meltLatticeResZ 0;
- }
- }
-
- // ================ setShatterOptionVars ================
- //
- // SYNOPSIS
- // Set the shatter clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- // OPTION VARIABLES
- //
- // Variable | Type | Values | Default | Notes
- // ----------------+-----------+-----------------------+-----------+--------
- // shatter type : string | surface/solid/crack : surface :
- //
- global proc setShatterOptionVars (int $setFactorySettings)
- {
- if ( $setFactorySettings )
- {
- string $shatterTypeValue = `optionVar -query shatterType`;
-
- if ( $shatterTypeValue == "shatterSurfaceTab" )
- {
- setSurfaceShatterOptionVars( $setFactorySettings );
- }
- else if ( $shatterTypeValue == "shatterSolidTab" )
- {
- setSolidShatterOptionVars( $setFactorySettings );
- }
- else if ( $shatterTypeValue == "shatterCrackTab" )
- {
- setCrackShatterOptionVars( $setFactorySettings );
- }
- }
- else
- {
- if ( !`optionVar -exists shatterType` )
- {
- optionVar -stringValue shatterType "shatterSurfaceTab";
- }
-
- setSurfaceShatterOptionVars( $setFactorySettings );
- setSolidShatterOptionVars ( $setFactorySettings );
- setCrackShatterOptionVars ( $setFactorySettings );
- }
- }
-
-
- // ================ setSurfaceShatterOptionVars ================
- //
- // SYNOPSIS
- // Set the shatter clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- // OPTION VARIABLES
- //
- // Variable | Type | Values | Default | Notes
- // ----------------+-----------+-----------------------+-----------+--------
- // shatter name : string | any string : surfaceShatter :
- // shard count : integer | > 1 : 5 :
- // smoothing : integer | on/off : on :
- // extrude : integer | on/off : off :
- // triangulate : integer | on/off : on :
- // post operation : string | sets/soft/rigid : sets :
- // edge Perturb : float | >= 0.0 : 0.0 :
- // exact shards : integer | on/off : on :
- // seed : integer | 0 - 100 : 0 :
- // verbose : integer | on/off : off :
- //
- global proc setSurfaceShatterOptionVars (int $setFactorySettings)
- {
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceName` )
- {
- optionVar -stringValue shatterSurfaceName "surfaceShatter";
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceShardCount` )
- {
- optionVar -intValue shatterSurfaceShardCount 5;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceTriangulate` )
- {
- optionVar -intValue shatterSurfaceTriangulate true;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceSmoothing` )
- {
- optionVar -intValue shatterSurfaceSmoothing true;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceExtrude` )
- {
- optionVar -floatValue shatterSurfaceExtrude 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfacePostOperation` )
- {
- optionVar -stringValue shatterSurfacePostOperation "shapes" ;
- }
- // if( $setFactorySettings || !`optionVar -exists shatterSurfaceEdgePerturbation` )
- // {
- // optionVar -floatValue shatterSurfaceEdgePerturbation 0.0;
- // }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceExactCount` )
- {
- optionVar -intValue shatterSurfaceExactCount true;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceVerbose` )
- {
- optionVar -intValue shatterSurfaceVerbose false;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceOriginal` )
- {
- optionVar -intValue shatterSurfaceOriginal 1;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceMakeRigidBody` )
- {
- optionVar -intValue shatterSurfaceMakeRigidBody 1;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSurfaceSeedValue` )
- {
- optionVar -intValue shatterSurfaceSeedValue 0;
- }
- }
-
-
- // ================ setSolidShatterOptionVars ================
- //
- // SYNOPSIS
- // Set the shatter clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- // OPTION VARIABLES
- //
- // Variable | Type | Values | Default | Notes
- // ----------------+-----------+-----------------------+-----------+--------
- // shatter name : string | any string : solidShatter :
- // shard count : integer | > 1 : 5 :
- // triangulate : integer | on/off : on :
- // post operation : string | shapes/sets/soft/rigid: sets :
- // edge Perturb : float | >= 0.0 : 0.0 :
- // seed : integer | 0 - 100 : 0 :
- // verbose : integer | on/off : off :
- //
- global proc setSolidShatterOptionVars (int $setFactorySettings)
- {
- if( $setFactorySettings || !`optionVar -exists shatterSolidName` )
- {
- optionVar -stringValue shatterSolidName "solidShatter";
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidShardCount` )
- {
- optionVar -intValue shatterSolidShardCount 5;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidTriangulate` )
- {
- optionVar -intValue shatterSolidTriangulate true;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidInteriorMaterial` )
- {
- optionVar -intValue shatterSolidInteriorMaterial true;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidRemoveInterior` )
- {
- optionVar -intValue shatterSolidRemoveInterior false;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidExtrude` )
- {
- optionVar -floatValue shatterSolidExtrude 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidPostOperation` )
- {
- optionVar -stringValue shatterSolidPostOperation "shapes" ;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidEdgePerturbation` )
- {
- optionVar -floatValue shatterSolidEdgePerturbation 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidVerbose` )
- {
- optionVar -intValue shatterSolidVerbose false;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidOriginal` )
- {
- optionVar -intValue shatterSolidOriginal 1;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidMakeRigidBody` )
- {
- optionVar -intValue shatterSolidMakeRigidBody 1;
- }
- if( $setFactorySettings || !`optionVar -exists shatterSolidSeedValue` )
- {
- optionVar -intValue shatterSolidSeedValue 0;
- }
- }
-
-
- // ================ setCrackShatterOptionVars ================
- //
- // SYNOPSIS
- // Set the shatter clip effect option box optionVars.
- //
- // INPUT ARGUMENTS
- // int $setFactorySettings whether to use default settings.
- //
- // OPTION VARIABLES
- //
- // Variable | Type | Values | Default | Notes
- // ----------------+-----------+-----------------------+-----------+--------
- // shatter name : string | any string : crackShatter :
- // crack count : integer | > 0 : 5 :
- // crack length : integer | > 0 : 50 :
- // triangulate : integer | on/off : on :
- // post operation : string | shapes/sets/soft/rigid: sets :
- // edge Perturb : float | >= 0.0 : 0.0 :
- // seed : integer | 0 - 100 : 0 :
- // verbose : integer | on/off : off :
- //
- global proc setCrackShatterOptionVars (int $setFactorySettings)
- {
- if( $setFactorySettings || !`optionVar -exists shatterCrackName` )
- {
- optionVar -stringValue shatterCrackName "crackShatter";
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackCount` )
- {
- optionVar -intValue shatterCrackCount 5;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackLength` )
- {
- optionVar -intValue shatterCrackLength 200;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackTriangulate` )
- {
- optionVar -intValue shatterCrackTriangulate true;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackExtrude` )
- {
- optionVar -floatValue shatterCrackExtrude 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackPostOperation` )
- {
- optionVar -stringValue shatterCrackPostOperation "shapes" ;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackEdgePerturbation` )
- {
- optionVar -floatValue shatterCrackEdgePerturbation 0.0;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackVerbose` )
- {
- optionVar -intValue shatterCrackVerbose false;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackOriginal` )
- {
- optionVar -intValue shatterCrackOriginal 1;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackMakeRigidBody` )
- {
- optionVar -intValue shatterCrackMakeRigidBody 1;
- }
- if( $setFactorySettings || !`optionVar -exists shatterCrackSeedValue` )
- {
- optionVar -intValue shatterCrackSeedValue 0;
- }
- }
-
-
-